package com.social.controller;

import com.social.pojo.Result;
import com.social.service.impl.ActivityRegisterServiceImpl;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @className: ActivityRegisterController
 * @description: TODO 类描述
 * @author: XiaoXu
 * @date: 2022/10/24 21:42
 **/
@Api(tags = "ActivityRegisterController")
@RestController
@RequestMapping("/register")
public class ActivityRegisterController {

    @Resource
    private ActivityRegisterServiceImpl activityRegisterService;

    @GetMapping("/activity/{id}")
    public Result registerActivity(@PathVariable("id") Long id){
        return activityRegisterService.registerActivity(id);
    }

    @PutMapping("/{id}")
    public Result repealActivity(@PathVariable("id") Long id){
        return activityRegisterService.repealActivity(id);
    }
}
